3.1.80 \(\int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx\) [80]

3.1.80.1 Optimal result
3.1.80.2 Mathematica [A] (verified)
3.1.80.3 Rubi [A] (verified)
3.1.80.4 Maple [C] (warning: unable to verify)
3.1.80.5 Fricas [F]
3.1.80.6 Sympy [F]
3.1.80.7 Maxima [F]
3.1.80.8 Giac [F(-1)]
3.1.80.9 Mupad [F(-1)]

3.1.80.1 Optimal result

Integrand size = 25, antiderivative size = 300 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx=a b c d^2 x+b^2 c d^2 x \arctan (c x)-\frac {5}{2} d^2 (a+b \arctan (c x))^2+2 i c d^2 x (a+b \arctan (c x))^2-\frac {1}{2} c^2 d^2 x^2 (a+b \arctan (c x))^2+2 d^2 (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )+4 i b d^2 (a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )-\frac {1}{2} b^2 d^2 \log \left (1+c^2 x^2\right )-2 b^2 d^2 \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )-i b d^2 (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )+i b d^2 (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )-\frac {1}{2} b^2 d^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )+\frac {1}{2} b^2 d^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right ) \]

output
a*b*c*d^2*x+b^2*c*d^2*x*arctan(c*x)-5/2*d^2*(a+b*arctan(c*x))^2+2*I*c*d^2* 
x*(a+b*arctan(c*x))^2-1/2*c^2*d^2*x^2*(a+b*arctan(c*x))^2-2*d^2*(a+b*arcta 
n(c*x))^2*arctanh(-1+2/(1+I*c*x))+4*I*b*d^2*(a+b*arctan(c*x))*ln(2/(1+I*c* 
x))-1/2*b^2*d^2*ln(c^2*x^2+1)-2*b^2*d^2*polylog(2,1-2/(1+I*c*x))-I*b*d^2*( 
a+b*arctan(c*x))*polylog(2,1-2/(1+I*c*x))+I*b*d^2*(a+b*arctan(c*x))*polylo 
g(2,-1+2/(1+I*c*x))-1/2*b^2*d^2*polylog(3,1-2/(1+I*c*x))+1/2*b^2*d^2*polyl 
og(3,-1+2/(1+I*c*x))
 
3.1.80.2 Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 360, normalized size of antiderivative = 1.20 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx=\frac {1}{2} d^2 \left (4 i a^2 c x-a^2 c^2 x^2+2 b^2 c x \arctan (c x)-b^2 \left (1+c^2 x^2\right ) \arctan (c x)^2-2 a b \left (-c x+\left (1+c^2 x^2\right ) \arctan (c x)\right )+2 a^2 \log (c x)+4 i a b \left (2 c x \arctan (c x)-\log \left (1+c^2 x^2\right )\right )-b^2 \log \left (1+c^2 x^2\right )+4 b^2 \left (\arctan (c x) \left ((1+i c x) \arctan (c x)+2 i \log \left (1+e^{2 i \arctan (c x)}\right )\right )+\operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )\right )+2 i a b (\operatorname {PolyLog}(2,-i c x)-\operatorname {PolyLog}(2,i c x))+2 b^2 \left (-\frac {i \pi ^3}{24}+\frac {2}{3} i \arctan (c x)^3+\arctan (c x)^2 \log \left (1-e^{-2 i \arctan (c x)}\right )-\arctan (c x)^2 \log \left (1+e^{2 i \arctan (c x)}\right )+i \arctan (c x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c x)}\right )+i \arctan (c x) \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )+\frac {1}{2} \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c x)}\right )-\frac {1}{2} \operatorname {PolyLog}\left (3,-e^{2 i \arctan (c x)}\right )\right )\right ) \]

input
Integrate[((d + I*c*d*x)^2*(a + b*ArcTan[c*x])^2)/x,x]
 
output
(d^2*((4*I)*a^2*c*x - a^2*c^2*x^2 + 2*b^2*c*x*ArcTan[c*x] - b^2*(1 + c^2*x 
^2)*ArcTan[c*x]^2 - 2*a*b*(-(c*x) + (1 + c^2*x^2)*ArcTan[c*x]) + 2*a^2*Log 
[c*x] + (4*I)*a*b*(2*c*x*ArcTan[c*x] - Log[1 + c^2*x^2]) - b^2*Log[1 + c^2 
*x^2] + 4*b^2*(ArcTan[c*x]*((1 + I*c*x)*ArcTan[c*x] + (2*I)*Log[1 + E^((2* 
I)*ArcTan[c*x])]) + PolyLog[2, -E^((2*I)*ArcTan[c*x])]) + (2*I)*a*b*(PolyL 
og[2, (-I)*c*x] - PolyLog[2, I*c*x]) + 2*b^2*((-1/24*I)*Pi^3 + ((2*I)/3)*A 
rcTan[c*x]^3 + ArcTan[c*x]^2*Log[1 - E^((-2*I)*ArcTan[c*x])] - ArcTan[c*x] 
^2*Log[1 + E^((2*I)*ArcTan[c*x])] + I*ArcTan[c*x]*PolyLog[2, E^((-2*I)*Arc 
Tan[c*x])] + I*ArcTan[c*x]*PolyLog[2, -E^((2*I)*ArcTan[c*x])] + PolyLog[3, 
 E^((-2*I)*ArcTan[c*x])]/2 - PolyLog[3, -E^((2*I)*ArcTan[c*x])]/2)))/2
 
3.1.80.3 Rubi [A] (verified)

Time = 0.76 (sec) , antiderivative size = 300, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {5411, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx\)

\(\Big \downarrow \) 5411

\(\displaystyle \int \left (-c^2 d^2 x (a+b \arctan (c x))^2+2 i c d^2 (a+b \arctan (c x))^2+\frac {d^2 (a+b \arctan (c x))^2}{x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 d^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-\frac {1}{2} c^2 d^2 x^2 (a+b \arctan (c x))^2-i b d^2 \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right ) (a+b \arctan (c x))+i b d^2 \operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right ) (a+b \arctan (c x))+2 i c d^2 x (a+b \arctan (c x))^2-\frac {5}{2} d^2 (a+b \arctan (c x))^2+4 i b d^2 \log \left (\frac {2}{1+i c x}\right ) (a+b \arctan (c x))+a b c d^2 x+b^2 c d^2 x \arctan (c x)-\frac {1}{2} b^2 d^2 \log \left (c^2 x^2+1\right )-2 b^2 d^2 \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right )-\frac {1}{2} b^2 d^2 \operatorname {PolyLog}\left (3,1-\frac {2}{i c x+1}\right )+\frac {1}{2} b^2 d^2 \operatorname {PolyLog}\left (3,\frac {2}{i c x+1}-1\right )\)

input
Int[((d + I*c*d*x)^2*(a + b*ArcTan[c*x])^2)/x,x]
 
output
a*b*c*d^2*x + b^2*c*d^2*x*ArcTan[c*x] - (5*d^2*(a + b*ArcTan[c*x])^2)/2 + 
(2*I)*c*d^2*x*(a + b*ArcTan[c*x])^2 - (c^2*d^2*x^2*(a + b*ArcTan[c*x])^2)/ 
2 + 2*d^2*(a + b*ArcTan[c*x])^2*ArcTanh[1 - 2/(1 + I*c*x)] + (4*I)*b*d^2*( 
a + b*ArcTan[c*x])*Log[2/(1 + I*c*x)] - (b^2*d^2*Log[1 + c^2*x^2])/2 - 2*b 
^2*d^2*PolyLog[2, 1 - 2/(1 + I*c*x)] - I*b*d^2*(a + b*ArcTan[c*x])*PolyLog 
[2, 1 - 2/(1 + I*c*x)] + I*b*d^2*(a + b*ArcTan[c*x])*PolyLog[2, -1 + 2/(1 
+ I*c*x)] - (b^2*d^2*PolyLog[3, 1 - 2/(1 + I*c*x)])/2 + (b^2*d^2*PolyLog[3 
, -1 + 2/(1 + I*c*x)])/2
 

3.1.80.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5411
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* 
x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & 
& IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
3.1.80.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 29.47 (sec) , antiderivative size = 1317, normalized size of antiderivative = 4.39

method result size
parts \(\text {Expression too large to display}\) \(1317\)
derivativedivides \(\text {Expression too large to display}\) \(1319\)
default \(\text {Expression too large to display}\) \(1319\)

input
int((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x,x,method=_RETURNVERBOSE)
 
output
a^2*d^2*(-1/2*c^2*x^2+2*I*c*x+ln(x))+b^2*d^2*(-1/2*polylog(3,-(1+I*c*x)^2/ 
(c^2*x^2+1))+2*polylog(3,(1+I*c*x)/(c^2*x^2+1)^(1/2))+2*polylog(3,-(1+I*c* 
x)/(c^2*x^2+1)^(1/2))-1/2*c^2*x^2*arctan(c*x)^2+ln(1+(1+I*c*x)^2/(c^2*x^2+ 
1))+3/2*arctan(c*x)^2+I*arctan(c*x)*polylog(2,-(1+I*c*x)^2/(c^2*x^2+1))+4* 
dilog(1+I*(1+I*c*x)/(c^2*x^2+1)^(1/2))+4*dilog(1-I*(1+I*c*x)/(c^2*x^2+1)^( 
1/2))+arctan(c*x)*(c*x-I)-arctan(c*x)^2*ln((1+I*c*x)^2/(c^2*x^2+1)-1)+arct 
an(c*x)^2*ln(c*x)+arctan(c*x)^2*ln(1-(1+I*c*x)/(c^2*x^2+1)^(1/2))+arctan(c 
*x)^2*ln(1+(1+I*c*x)/(c^2*x^2+1)^(1/2))-2*I*arctan(c*x)*polylog(2,(1+I*c*x 
)/(c^2*x^2+1)^(1/2))-2*I*arctan(c*x)*polylog(2,-(1+I*c*x)/(c^2*x^2+1)^(1/2 
))+1/2*I*Pi*arctan(c*x)^2+1/2*I*Pi*csgn(I/(1+(1+I*c*x)^2/(c^2*x^2+1)))*csg 
n(I*((1+I*c*x)^2/(c^2*x^2+1)-1))*csgn(I*((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+ 
I*c*x)^2/(c^2*x^2+1)))*arctan(c*x)^2+1/2*I*Pi*csgn(I*((1+I*c*x)^2/(c^2*x^2 
+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))*csgn(((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1 
+I*c*x)^2/(c^2*x^2+1)))*arctan(c*x)^2-1/2*I*Pi*csgn(I/(1+(1+I*c*x)^2/(c^2* 
x^2+1)))*csgn(I*((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^2 
*arctan(c*x)^2-1/2*I*Pi*csgn(I*((1+I*c*x)^2/(c^2*x^2+1)-1))*csgn(I*((1+I*c 
*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^2*arctan(c*x)^2+2*I*arct 
an(c*x)^2*c*x+1/2*I*Pi*csgn(((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^ 
2*x^2+1)))^3*arctan(c*x)^2-1/2*I*Pi*csgn(((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1 
+I*c*x)^2/(c^2*x^2+1)))^2*arctan(c*x)^2+1/2*I*Pi*csgn(I*((1+I*c*x)^2/(c...
 
3.1.80.5 Fricas [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x,x, algorithm="fricas")
 
output
integral(-1/4*(4*a^2*c^2*d^2*x^2 - 8*I*a^2*c*d^2*x - 4*a^2*d^2 - (b^2*c^2* 
d^2*x^2 - 2*I*b^2*c*d^2*x - b^2*d^2)*log(-(c*x + I)/(c*x - I))^2 + 4*(I*a* 
b*c^2*d^2*x^2 + 2*a*b*c*d^2*x - I*a*b*d^2)*log(-(c*x + I)/(c*x - I)))/x, x 
)
 
3.1.80.6 Sympy [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx=- d^{2} \left (\int \left (- \frac {a^{2}}{x}\right )\, dx + \int \left (- 2 i a^{2} c\right )\, dx + \int a^{2} c^{2} x\, dx + \int \left (- \frac {b^{2} \operatorname {atan}^{2}{\left (c x \right )}}{x}\right )\, dx + \int \left (- 2 i b^{2} c \operatorname {atan}^{2}{\left (c x \right )}\right )\, dx + \int \left (- \frac {2 a b \operatorname {atan}{\left (c x \right )}}{x}\right )\, dx + \int b^{2} c^{2} x \operatorname {atan}^{2}{\left (c x \right )}\, dx + \int \left (- 4 i a b c \operatorname {atan}{\left (c x \right )}\right )\, dx + \int 2 a b c^{2} x \operatorname {atan}{\left (c x \right )}\, dx\right ) \]

input
integrate((d+I*c*d*x)**2*(a+b*atan(c*x))**2/x,x)
 
output
-d**2*(Integral(-a**2/x, x) + Integral(-2*I*a**2*c, x) + Integral(a**2*c** 
2*x, x) + Integral(-b**2*atan(c*x)**2/x, x) + Integral(-2*I*b**2*c*atan(c* 
x)**2, x) + Integral(-2*a*b*atan(c*x)/x, x) + Integral(b**2*c**2*x*atan(c* 
x)**2, x) + Integral(-4*I*a*b*c*atan(c*x), x) + Integral(2*a*b*c**2*x*atan 
(c*x), x))
 
3.1.80.7 Maxima [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x,x, algorithm="maxima")
 
output
-12*b^2*c^4*d^2*integrate(1/16*x^4*arctan(c*x)^2/(c^2*x^3 + x), x) + 2*I*b 
^2*c^4*d^2*integrate(1/8*x^4*arctan(c*x)*log(c^2*x^2 + 1)/(c^2*x^3 + x), x 
) - b^2*c^4*d^2*integrate(1/16*x^4*log(c^2*x^2 + 1)^2/(c^2*x^3 + x), x) + 
2*I*b^2*c^4*d^2*integrate(1/8*x^4*arctan(c*x)/(c^2*x^3 + x), x) - 32*a*b*c 
^4*d^2*integrate(1/16*x^4*arctan(c*x)/(c^2*x^3 + x), x) - 2*b^2*c^4*d^2*in 
tegrate(1/16*x^4*log(c^2*x^2 + 1)/(c^2*x^3 + x), x) - 1/2*a^2*c^2*d^2*x^2 
+ 12*I*b^2*c^3*d^2*integrate(1/8*x^3*arctan(c*x)^2/(c^2*x^3 + x), x) + 8*b 
^2*c^3*d^2*integrate(1/16*x^3*arctan(c*x)*log(c^2*x^2 + 1)/(c^2*x^3 + x), 
x) + I*b^2*c^3*d^2*integrate(1/8*x^3*log(c^2*x^2 + 1)^2/(c^2*x^3 + x), x) 
+ 20*b^2*c^3*d^2*integrate(1/16*x^3*arctan(c*x)/(c^2*x^3 + x), x) + 5*I*b^ 
2*c^3*d^2*integrate(1/8*x^3*log(c^2*x^2 + 1)/(c^2*x^3 + x), x) + 1/2*I*b^2 
*d^2*arctan(c*x)^3 - 8*I*b^2*c^2*d^2*integrate(1/8*x^2*arctan(c*x)/(c^2*x^ 
3 + x), x) + 2*I*a^2*c*d^2*x + 8*b^2*c*d^2*integrate(1/16*x*arctan(c*x)*lo 
g(c^2*x^2 + 1)/(c^2*x^3 + x), x) + I*b^2*c*d^2*integrate(1/8*x*log(c^2*x^2 
 + 1)^2/(c^2*x^3 + x), x) + 1/8*b^2*d^2*log(c^2*x^2 + 1)^2 + 2*I*(2*c*x*ar 
ctan(c*x) - log(c^2*x^2 + 1))*a*b*d^2 + 12*b^2*d^2*integrate(1/16*arctan(c 
*x)^2/(c^2*x^3 + x), x) - 2*I*b^2*d^2*integrate(1/8*arctan(c*x)*log(c^2*x^ 
2 + 1)/(c^2*x^3 + x), x) + b^2*d^2*integrate(1/16*log(c^2*x^2 + 1)^2/(c^2* 
x^3 + x), x) + 32*a*b*d^2*integrate(1/16*arctan(c*x)/(c^2*x^3 + x), x) + a 
^2*d^2*log(x) - 1/8*(b^2*c^2*d^2*x^2 - 4*I*b^2*c*d^2*x)*arctan(c*x)^2 +...
 
3.1.80.8 Giac [F(-1)]

Timed out. \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx=\text {Timed out} \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))^2/x,x, algorithm="giac")
 
output
Timed out
 
3.1.80.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))^2}{x} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2\,{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^2}{x} \,d x \]

input
int(((a + b*atan(c*x))^2*(d + c*d*x*1i)^2)/x,x)
 
output
int(((a + b*atan(c*x))^2*(d + c*d*x*1i)^2)/x, x)